//
//  AddressBookTwoViewController.m
//  lsOA
//
//  Created by 蓝水软件 on 16/9/14.
//  Copyright © 2016年 苏州蓝水有限公司. All rights reserved.
//

#import "AddressBookTwoViewController.h"
#import "GroupingBookViewController.h"
#import "UserFollowViewController.h"
#import "CompanyBookViewController.h"
#import "NinaPagerView.h"


@interface AddressBookTwoViewController ()

@end

@implementation AddressBookTwoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    //导航条上的字段
    NSArray *titleArray = @[@"所有",@"分组",@"部门"];
   
    //每个字段对应的控制器(记得把控制器的名字导入)
    NSArray *vcArray = @[@"UserFollowViewController",@"GroupingBookViewController",@"CompanyBookViewController"];
    //介绍一下这四个颜色的意思:1.选中字体的颜色 2.未选中字体的颜色  3.下面导航条的颜色 4.导航栏北京的颜色
//    NSArray *colorArray = @[[UIColor blueColor],[UIColor grayColor],[UIColor blueColor],[UIColor whiteColor]];

    //把这个类放到使用的控制器上
//    NinaPagerView *ninaPagerView = [[NinaPagerView alloc] initWithNinaPagerStyle:NinaPagerStyleBottomLine WithTitles:titleArray WithVCs:vcArray WithColorArrays:nil];
    CGRect pagerRect = CGRectMake(0, 0, KSWidth, KSHeight-64);
    NinaPagerView *ninaPagerView = [[NinaPagerView alloc]initWithFrame:pagerRect WithTitles:titleArray WithVCs:vcArray];
    ninaPagerView.ninaPagerStyles = NinaPagerStyleBottomLine;
    ninaPagerView.topTabHeight = 60;
    ninaPagerView.ninaDefaultPage = 0;
    ninaPagerView.loadWholePages = NO;
    //消除导航栏的影响
    self.edgesForExtendedLayout = UIRectEdgeNone;
    //放在使用的控制器上面
    [self.view addSubview:ninaPagerView];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
